Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[parser] fixing bug with json parser #453

Merged
merged 3 commits into from
Nov 7, 2017

Conversation

ryandeivert
Copy link
Contributor

@ryandeivert ryandeivert commented Nov 7, 2017

to: @jacknagz
cc: @airbnb/streamalert-maintainers @0xdabbad00
size: small
resolves N/A

Background

Discovered a bug where the json parser would attempt to extract records using a json path if one was defined, but would continue processing even if the path does not exist.

Changes

  • Returning if jsonpath_rw.parse(...).find(...) does not find a valid json path.
  • Updating misconfigured test events for cloudtrail:events
    • This accounts for the majority of these changes since these json files needed json prettified.
  • Some other misc cleanup.

Testing

Adding unit test to check for valid json path before continuing to process.

@ryandeivert ryandeivert force-pushed the ryandeivert-fix-invalid-json-path branch from 895f0c9 to 67c1059 Compare November 7, 2017 23:03
@airbnb airbnb deleted a comment from coveralls Nov 7, 2017
@ryandeivert ryandeivert force-pushed the ryandeivert-fix-invalid-json-path branch from 67c1059 to 3e0dd19 Compare November 7, 2017 23:04
@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 95.583% when pulling 3e0dd19 on ryandeivert-fix-invalid-json-path into 54a70c4 on master.

@coveralls
Copy link

Coverage Status

Coverage increased (+0.006%) to 95.583% when pulling 3e0dd19 on ryandeivert-fix-invalid-json-path into 54a70c4 on master.

Copy link
Contributor

@jacknagz jacknagz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the quick fix!!!

@ryandeivert ryandeivert merged commit b250bf3 into master Nov 7, 2017
@ryandeivert ryandeivert added this to the 1.6.0 milestone Nov 8, 2017
@ryandeivert ryandeivert deleted the ryandeivert-fix-invalid-json-path branch November 8, 2017 22:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants